//
//  ImageTableViewCell.m
//  10-HomeWork
//
//  Created by 李昊林 on 16/7/27.
//  Copyright © 2016年 李昊林. All rights reserved.
//


#import "ImageTableViewCell.h"
#import "UIView+Frame.h"

@interface ImageTableViewCell ()
@property (nonatomic, strong) UIImageView *firstImage;
@property (nonatomic, strong) UIImageView *secondImage;
@property (nonatomic, strong) UIImageView *thirdImage;
@end
@implementation ImageTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _firstImage = [[UIImageView alloc] init];
        _firstImage.backgroundColor = [UIColor blackColor];
        [self.contentView addSubview:_firstImage];
        _secondImage = [[UIImageView alloc] init];
        _secondImage.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_secondImage];
        _secondImage = [[UIImageView alloc] init];
        _thirdImage.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_thirdImage];
    }
    return self;
}
- (void)layoutSubviews {
    _firstImage.frame = CGRectMake(5, 5, (self.contentView.hl_width - 20) / 3, self.contentView.hl_height - 10);
    _secondImage.frame = CGRectMake( (self.contentView.hl_width - 20) / 3 + 10, 5,  (self.contentView.hl_width - 20) / 3, self.contentView.hl_height - 10);
    _thirdImage.frame = CGRectMake( (self.contentView.hl_width - 20) / 3 * 2 + 15, 5,  (self.contentView.hl_width - 20) / 3, self.contentView.hl_height - 10);
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
